import request from '/@/utils/request';

const evaPath = '/eva';

// 查询预警分值列表
export function listWarning(query: object) {
  return request({
    url: evaPath + '/warning/page',
    method: 'get',
    params: query
  })
}

// 查询预警分值详细
export function getWarning(id: string) {
  return request({
    url: evaPath + '/warning/' + id,
    method: 'get'
  })
}

// 新增预警分值
export function addWarning(data: object) {
  return request({
    url: evaPath + '/warning',
    method: 'post',
    data: data
  })
}

// 修改预警分值
export function updateWarning(data: object) {
  return request({
    url: evaPath + '/warning',
    method: 'put',
    data: data
  })
}

// 删除预警分值
export function delWarning(id: string) {
  return request({
    url: evaPath + '/warning/' + id,
    method: 'delete'
  })
}
